-
Notifications
You must be signed in to change notification settings - Fork 117
Prepare for 0.9.0 release #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0d0f6ba to
6f25c6f
Compare
|
My no-std use case only requires &str to work. This is fine for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are the only things that cought my eye
Also I have to say I dont understand your check_null_bytes fn in util, like it is very hard to read what it does. I just assume that it works as intended.
|
Unfortunately the supertrait sealing makes the implementers not visible in the documentation, which I think is crucial to have here. We can explore other options, although at the same time: are these suggestions showing up even when the trait isn't imported? There should rarely be a need for anybody to import the trait. |
|
Hm, maybe we could still use super trait and have the methods on it, but instead of having a generic |
|
The suggestion shows up when the trait is not imported. Its enough to have libloading in Cargo.toml. Its not that big of a deal, just can be confusing. I happen to coincidentally maintain an unrelated crate that requires usage of String and friends in CESU-8 byte encoding. |
b009346 to
14638bb
Compare
|
Ah rustdoc must have not been smart enough to see my generic impl for T, that makes sense. Yes them showing up in the doc like that is indeed more important than not potentically annoying RustRover users (like me). Good thinking with the manual impl, glad we could get that sorted out. I am still working on unrelated things so I can actually compile my inteded library with no-std and libloading as I intend to. I will report back once I have succeeded (or failed, but that is unlikely). |
14638bb to
44eb45b
Compare
|
Alright all is working as expected for my use case. RustRover is also quiet now. Was once again a pleasure working on this with you and I also learned something new! |
* `impl AsSymbolName for &[u16]` hides unconditional allocation (user could pass a `&str` or `&[u8]` or `&CStr` instead all of which should be more straightforward. * `impl AsFilename for &[T]` have awkward platform implications. With `T = u16` we require that buffer is valid UTF-16, for `T = u8` we require that it is UTF-8 but only on Windows. I'm not super comfortable with having these types in the cross-platform API surface currently. We can explore adding something as a follow-up, but for now no-std users will have to live with passing in a `&str`. * Similarly for `impl AsFilename for CString` family. * There are a couple of no-std capable tests that sufficiently test the functionality of no-std behaviour. For the rest it is fine to require that libstd is available. So this removes most of the duplicate no-std tests.
44eb45b to
e1416f7
Compare


cc @AlexanderSchuetz97 double-check that this works for you.
I ended up nuking a number of
AsFilenameandAsSymbolNameimpls still and made the remaining ones terser. We can easily add them back later on in a backwards-compatible manner if it turns out that the current impls don't serve some specific need for some reason or another.